#ifndef _CCubic_H
#define _CCubic_H

#include "CCube.h"
#include "CDXAudio3D.h"

#define ROTATE_LEFT		0
#define ROTATE_RIGHT	1
#define ROTATE_UP		2
#define ROTATE_DOWN		3
#define ROTATE_ZLEFT	4
#define ROTATE_ZRIGHT	5

#define ROTATEANGLE		9

class CCubic {

public:
	CCubic();
	~CCubic();

	void Init(float sizePerCube);
	void Scale(int num, float size);
	void FindLocationSelected();
	void RotateCubic(int key, int czone);
	void Rotate();
	void Draw();
	bool GetRotateState();
	bool InitSound();
	void Save();
	bool Load();
	void Reset();
	void BackTurn();

private:
	CCube	m_Cube[28];
	int		m_location[28];

	bool	m_bRotate;
	float	m_RotateAngle;
	int		m_RotateAmount;
	int		m_cZone;
	int		m_key;

	int		m_selected;
	int		m_locSelected;

	//-Sound--------------------------
	D3DVECTOR listenerPos;
	D3DVECTOR frontVector;

	CDXAudio3D *bgm;

	float zpos;
	//--------------------------------
};

#define CUBE01		101
#define CUBE02		102
#define CUBE03		103
#define CUBE04		104
#define CUBE05		105
#define CUBE06		106
#define CUBE07		107
#define CUBE08		108
#define CUBE09		109
#define CUBE10		110
#define CUBE11		111
#define CUBE12		112
#define CUBE13		113
#define CUBE14		114
#define CUBE15		115
#define CUBE16		116
#define CUBE17		117
#define CUBE18		118
#define CUBE19		119
#define CUBE20		120
#define CUBE21		121
#define CUBE22		122
#define CUBE23		123
#define CUBE24		124
#define CUBE25		125
#define CUBE26		126
#define CUBE27		127

#define SKYBOX		130

#endif
